﻿using PoliticalClassifier.Support;

namespace PoliticalClassifier.Calculations
{
    /// <summary>
    /// CandidateResults contains the results of the simulation for a candidate.
    /// </summary>
    internal class CandidateResults : ICandidateResults
    {
        #region Construction
        /// <summary>
        /// Constructs the candidate results from a given candidate.
        /// </summary>
        /// <param name="candidate">The candidate the results are for.</param>
        public CandidateResults(ICandidate candidate)
        {
            Candidate = candidate;
            NumberOfVotes = 0;
            DistanceFromMedian = 0.0;
        }
        #endregion
        /// <summary>
        /// Gets the candidate these results are for.
        /// </summary>
        public ICandidate Candidate { get; private set; }

        /// <summary>
        /// Gets or sets the number of votes for the candidate.
        /// </summary>
        public int NumberOfVotes { get; set; }

        /// <summary>
        /// Gets or sets the distance from the overall voter median for the candidate.
        /// </summary>
        public double DistanceFromMedian { get; set; }
    }
}
